package org.wxd.email.api.dto;

import java.io.Serializable;

/**
 * Created by wangxd on 2015/11/4.
 */
public class SendMailRequest implements Serializable {
    private static final long serialVersionUID = 2136872968327599833L;

    private String to;
    private String subject;
    private String content;
    SendMailRequest(){}
    public SendMailRequest(Builder builder) {
        this.to = builder.to;
        this.subject = builder.subject;
        this.content = builder.content;
    }

    public static Builder newBuilder(){
        return new Builder();
    }

    public String content() {
        return content;
    }

    public String to() {
        return to;
    }

    public String subject() {
        return subject;
    }

    public static class Builder{
        String to;
        String subject;
        String content;

        public Builder to(String to) {
            this.to = to;
            return this;
        }

        public Builder subject(String subject) {
            this.subject = subject;
            return this;
        }

        public Builder content(String content) {
            this.content = content;
            return this;
        }

        public SendMailRequest build(){
            return new SendMailRequest(this);
        }
    }
}
